package abnomity;

import com.sun.prism.shader.Texture_ImagePattern_AlphaTest_Loader;

/**
 * Version: 1.1
 * Author: TangJun
 * Date: 2024-07-20
 */
public class Test2 {
    public static void test(int a) throws CloneNotSupportedException{
        if (a == 2) {
            throw new ArithmeticException();
        }
        int b = a / 0;
        throw new CloneNotSupportedException();
    }
    public static void main(String[] args) {
        System.out.println();
        try{
            test(2);
        } catch (ArithmeticException e) {
            e.printStackTrace();
            System.out.println("catch: 算术异常");
            return;
        } catch(CloneNotSupportedException e) {
           e.printStackTrace();
            System.out.println("克隆不支持异常");
        } finally {
            System.out.println("finally: 总会执行的代码");
            System.out.println("IO接口！！！");
        }
    }
}
